package com.gollum.common.domain.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 通用响应对象抽象
 *
 * @author Herther
 * @version 1.0.0
 * @createTime 2022年08月27日 00:18:00
 */
public class BaseResponse implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 主键 **/
    @JsonSerialize(using = ToStringSerializer.class)
    protected Long id;

    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建人",name = "createBy")
    protected String createBy;

    /**
     * 更新者
     */
    @ApiModelProperty(value = "修改人",name = "modifyBy")
    protected String modifyBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间",name = "createTime")
    protected Date createTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间",name = "modifyTime")
    protected Date modifyTime;

    //@ApiModelProperty(value = "删除标志 0存在 1删除",name = "hasDel")
    //protected String hasDel;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注",name = "remark")
    protected String remark;

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getModifyBy() {
        return modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    //public String getHasDel() {
    //    return hasDel;
    //}
    //
    //public void setHasDel(String hasDel) {
    //    this.hasDel = hasDel;
    //}

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
